//////////////////////////////////////////////////////////////////////////
//
// K&K Studio GameKnife ENGINE Source File
//
// Name:   	MainPalette.h
// Desc:		
// 	
// Author:  Kaiming
// Date:	2012/5/6
// Modify:	2012/5/6
// 
//////////////////////////////////////////////////////////////////////////

#ifndef _MainPalette_h_
#define _MainPalette_h_

#include "IPaletteBase.h"

class CBlock;

class CMainPalette : public IPaletteBase
{
public:
	CMainPalette(cocos2d::CCLayer* father, SPaletteFrame& frame);
	virtual ~CMainPalette();

	virtual void init();

	virtual void destroy();

	virtual void display();

	virtual void hide();

	virtual void restart();
	
	virtual void execute( const cocos2d::CCPoint& start, const cocos2d::CCPoint& end );



	virtual int getBlockIndex( const cocos2d::CCPoint& point );

	

private:
	const int	BLOCK_NUM;
	const float BLOCK_SIZE;
	const float BLOCK_STARTX;
	const float BLOCK_STARTY;
	const char* FRONTPALETTE_IMAGE;


	cocos2d::CCLayer* m_pFather;

	CBlock* m_blocks;
	cocos2d::CCSprite* m_frontPalette;

};

#endif